#pragma once

#include <string>
#include "yj_return.hpp"
#include "uart_v2.hpp"
#include "uart_v2.hpp"
#include <glog/logging.h>
#include <mutex>
#include <string>
#include <glob.h>



class code_scan
{
private:
    uart_v2* _uart;
    std::string _code;

    std::mutex _data_lock;


    yj_return _init_flag;

public:
    code_scan(uart_v2* uart);
    yj_return get_color_index_with_round(uint8_t round_index,uint8_t times_index,uint8_t& color_index);
    yj_return get_code();
    std::string get_code_str();
};